Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT LocaleObjects;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __LOCALEOBJECTS__}
{$SETC __LOCALEOBJECTS__ := 1}
{$I+}
{$SETC LocaleObjectsIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __TYPES__}
{$I Types.p}
{$ENDC}
{$IFC UNDEFINED __TEXTOBJECTS__}
{$I TextObjects.p}
{$ENDC}
{$IFC UNDEFINED __TEXTCOMMON__}
{$I TextCommon.p}
{$ENDC}
{$IFC UNDEFINED __FILEMANAGERTYPES__}
{$I FileManagerTypes.p}
{$ENDC}
{$PUSH}
{$ALIGN MAC68K}
{$LibExport+}
{$IFC FOR_SYSTEM8_PREEMPTIVE }
{ Locale errors }
TYPE
LocaleErrors = OSStatus;
LocaleIterateOp = UInt16;
CONST
kLocaleForwardIterate = 0;
kLocaleBackwardIterate = 1;
TYPE
LocaleNameIdentifier = SInt16;
CONST
kLocaleObjectKeyNameIndex = 0;
kLocaleObjectUserName = 1;
kLocaleObjectCopyrightString = 2;
kLocaleObjectManufacturerString = 3;
kLocaleObjectFunctionDescription = 4;
kLocaleObjectVersionString = 5;
TYPE
LocaleDefaultValue = LocaleNameIdentifier;
CONST
kLocaleLanguageID = $000A; { language id }
kLocaleLanguageLocalizedName = $1001; { localized name of language }
kLocaleLanguageEnglishName = $000B; { English name of language }
kLocaleAbbreviatedLanguageName = $000C; { abbreviated language name }
kLocaleLanguageNativeName = $000D; { native name of language }
kLocaleCountryCode = $000E; { country code }
kLocaleLocalizedCountryName = $000F; { localized name of country }
kLocaleEnglishCountryName = $1002; { English name of country }
kLocaleAbbreviatedCountryName = $001F; { abbreviated country name }
kLocaleNativeCountryName = $002F; { native name of country }
kLocaleDefaultLanguageID = $003F; { default language id }
kLocaleDefaultCountryCode = $004F; { default country code }
TYPE
LocaleObjectContext = UInt16;
CONST
kLocaleObjectIsGlobal = 0;
kLocaleObjectIsLocal = 1;
TYPE
LocaleDataTag = OSType;
LocaleObjectTagIndex = UInt32;
LocaleRef = ^LONGINT;
LocaleIteratorReference = ^LONGINT;
LocaleObjectRef = ^LONGINT;
NameValuePairPtr = ^NameValuePair;
NameValuePair = RECORD
name: StringPtr;
valueLength: ByteCount;
value: Ptr;
END;
NameTableEntryPtr = ^NameTableEntry;
NameTableEntry = RECORD
nameID: LocaleNameIdentifier;
reserved: UInt16;
name: TextObject;
END;
FUNCTION GetCurrentProcessLocaleRef: LocaleRef; C;
FUNCTION GetLocaleReference(identifier: LocaleIdentifier; VAR locale: LocaleRef): OSStatus; C;
FUNCTION LocaleIteratorCreate(locale: LocaleRef; keyName: Str255; countAttributes: ItemCount; {CONST}VAR attributes: NameValuePair; VAR localeIteratorRef: LocaleIteratorReference): OSStatus; C;
FUNCTION LocaleIteratorDispose(localeIteratorRef: LocaleIteratorReference): OSStatus; C;
{
The void * returned as the dataPtr and the LocaleObjectRef * both
point into read-only memory. Use const to invoke the compiler's help
in preventing write-accesses to that data.
}
FUNCTION LocaleIterate(localeIteratorRef: LocaleIteratorReference; op: LocaleIterateOp; VAR dataPtr: UNIV Ptr; VAR dataSize: ByteCount; VAR objectRef: LocaleObjectRef): OSStatus; C;
FUNCTION GetLocaleObjectName(objectRef: LocaleObjectRef; nameID: LocaleNameIdentifier; encoding: TextEncoding; languageRegion: LocaleIdentifier; VAR nameSize: ByteCount; name: TextObject): OSStatus; C;
FUNCTION GetLocaleObjectKeyName(objectRef: LocaleObjectRef; VAR keyName: Str255): OSStatus; C;
FUNCTION GetLocaleObjectData(objectRef: LocaleObjectRef; VAR localeObjectData: UNIV Ptr; VAR dataSize: ByteCount): OSStatus; C;
FUNCTION GetLocaleObjectAttributes(objectRef: LocaleObjectRef; {CONST}VAR attributes: NameValuePairPtr; VAR countPairs: ItemCount): OSStatus; C;
FUNCTION GetLocaleObjectFSObjectRef(localeObjRef: LocaleObjectRef; VAR fileRef: FSObjectRef): OSStatus; C;
FUNCTION GetLocaleObjectLocale(objectRef: LocaleObjectRef; VAR locale: LocaleRef; VAR localeID: LocaleIdentifier): OSStatus; C;
FUNCTION GetLocaleObjectMemoryContext(objectRef: LocaleObjectRef; VAR context: LocaleObjectContext): OSStatus; C;
FUNCTION SetLocaleIterator(locale: LocaleRef; keyName: Str255; countAttributes: ItemCount; {CONST}VAR attributes: NameValuePair; VAR localeIteratorRef: LocaleIteratorReference): OSStatus; C;
FUNCTION SearchOneLocaleObject(locale: LocaleRef; keyName: Str255; countAttributes: ItemCount; {CONST}VAR attributes: NameValuePair; VAR localeObjectData: UNIV Ptr; VAR dataSize: ByteCount; {CONST}VAR objectRef: LocaleObjectRef): OSStatus; C;
FUNCTION RemoveLocaleObject(objectRef: LocaleObjectRef): OSStatus; C;
FUNCTION CountLocaleObjectAssociatedDataTags(objectRef: LocaleObjectRef): ItemCount; C;
FUNCTION GetIndexedAssociatedData(objectRef: LocaleObjectRef; tagIndex: LocaleObjectTagIndex; VAR tag: LocaleDataTag; VAR associatedDataPtr: UNIV Ptr; VAR size: ByteCount): OSStatus; C;
FUNCTION GetLocaleObjectAssociatedData(objectRef: LocaleObjectRef; tag: LocaleDataTag; VAR associatedDataPtr: UNIV Ptr; VAR size: ByteCount): OSStatus; C;
FUNCTION CountInstalledLocales: ItemCount; C;
FUNCTION GetFirstLocale(VAR locale: LocaleRef; VAR localeID: LocaleIdentifier): OSStatus; C;
FUNCTION GetNextLocale(VAR locale: LocaleRef; VAR localeID: LocaleIdentifier): OSStatus; C;
FUNCTION SetCurrentProcessLocale(localeID: LocaleIdentifier; VAR locale: LocaleRef): OSStatus; C;
FUNCTION GetSystemDefaultLocale: LocaleRef; C;
FUNCTION GetSystemLocaleIdentifier: LocaleIdentifier; C;
FUNCTION GetCurrentProcessLocaleIdentifier: LocaleIdentifier; C;
FUNCTION GetLocaleRefLocaleIdentifier(locale: LocaleRef): LocaleIdentifier; C;
FUNCTION GetDefaultLocaleObject(locale: LocaleRef; keyName: Str255; VAR objectRef: LocaleObjectRef): OSStatus; C;
FUNCTION SetDefaultLocaleObject(locale: LocaleRef; objectRef: LocaleObjectRef): OSStatus; C;
FUNCTION GetLocaleInformation(locale: LocaleRef; infoIndex: LocaleDefaultValue; VAR infoText: TextObject): OSStatus; C;